<%@ page contentType="text/html; charset=utf-8" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>日程管理</title>
        <link href="../style/main.css" rel="stylesheet" type="text/css" />
        <link type="text/css" rel="stylesheet" href="../style/style.css" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-bottom: 0px;
}
-->
</style>
<style type="text/css">
<!--
a:visited {
	color: #000000;
	text-decoration: none;
}
a:hover {
	color: #FF0000;
	text-decoration: none;
}
a:active {
	color: #0066FF;
	text-decoration: none;
}
a:link {
	color:#3333CC;
	text-decoration: none;
}
.STYLE2 {
	font-size: 18px;
	font-weight: bold;
}
.table {
	border-top-width: medium;
	border-right-width: medium;
	border-bottom-width: medium;
	border-left-width: medium;
	border-top-style: double;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
	border-top-color: #999999;
	border-right-color: #999999;
	border-bottom-color: #999999;
	border-left-color: #999999;
}
.STYLE3 {font-size: 12px}
-->
</style>

<%@ taglib prefix="s" uri="/struts-tags" %>

<script type="text/javascript">
	function showAddForm(flag)
	{
		if(flag)
		{
			document.getElementById("editLogDiv").style.display="";
		}
		else
		{
			document.getElementById("editLogDiv").style.display="none";
		}
	}
	function addNewAgenda()
	{
		editPlanForm.submit();
	}
</script>
<script type="text/javascript" src="../ckeditor/ckeditor.js"></script>
</head>
<body>
<div class="search">
<table width="100%" cellSpacing="0" cellPadding="0" class="table">
    	<tr>
      		<td colspan="3" height="9"></td>
    	</tr>
    	<tr>
      		<td vAlign="top" align="left" width="24" height="27"><IMG height="27" src="images/right_tab1_top_left.jpg" width="24" border="0"></td>
      		<td style="PADDING-TOP: 5px" valign="middle" width="100%" background=images/right_tab1_top_bg.jpg height="27" class="STYLE3">查看工作日志</td>
      		<td vAlign="top" align="right" width="13" height="27"><IMG height=27 src="images/right_tab1_top_right.jpg" width="13" border="0"></td>
   		</tr>
    	<tr>
     	 <td colspan="3" height="100%" align="center" valign="top">
			<table cellpadding="0" cellspacing="0" width="100%" class="table4">
              <tr bgcolor="#BBD2F7">
                <th height="25" colspan="3" class="title">
                    	工作日志
                </th>
                <td height="25" align="right" colspan="2">
                	<span style="color:#666">
                		[<a href="javascript:void(0);" onclick="javascript:showAddForm(true);">添加工作日志</a>]
                	</span>
                </td>
              </tr>
              <tr bgcolor="#FAFBDC">
                <th width="40%" height="25" align="center" class="style3">工作主题</th>
                <th width="10%" height="25" align="center" class="style3">日志日期</th>
                <th width="20%" height="25" align="center" class="style3">创建时间</th>
                <th width="20%" height="25" align="center" class="style3">最后修改时间</th>
                <th width="10%" height="25" align="center" class="style3">操作</th>
              </tr>
              
            <s:iterator value="#request.worklogList" status="st" id="worklogList">
              <tr>
                <td align="left" class="style3">
                	<a href="worklog!showWorklog?logId=<s:property value='logId' />">
                	<s:property value="logTitle" />
                	</a>
                </td>
                <td align="left" class="style3">
                	<s:date name="logdate" format="yyyy-MM-dd"/>
                </td>
              	<td>
                	<s:date name="createTime" format="yyyy-MM-dd HH:mm:ss"/>
              	</td>
              	<td>
                	<s:date name="updateTime" format="yyyy-MM-dd HH:mm:ss"/>
              	</td>
                <td align="left" class="style3">
                    <a href="worklog!startEdit?logId=<s:property value='logId' />">修改</a>&nbsp;
	           		<a href="worklog!removeWorklog?logId=<s:property value='logId' />"> 删除</a>
                </td>
              	<td></td>
              </tr>
    		</s:iterator>
              <tr>
                <td height="30" class="STYLE3" colspan="5">
                </td>
              </tr>
    		</table>
		</td>
    </tr>
</table>
</div>
<div class="clear"></div>
<div id="editLogDiv" class="search" style="display: none">
    <s:form id="editLogForm" name="editLogForm" action="worklog!addWorklog" method="post" theme="simple">
    	
    	<s:hidden name="logdate"></s:hidden>
    	<table width="100%" border="0" align="left" cellpadding="0" cellspacing="2" class="table4" >
        	<tr>
            	<th height="25" colspan="3" bgcolor="#BBD2F7" class="title">发布公告</th>
            </tr>
            <tr height="50px">
            	<th width="60px">主题：</th>
                <td width="700px">
                	<s:textfield id="logTitle" name="worklog.logTitle" cssStyle="width:500px"/>
                </td>
                <td></td>
            </tr>
            <tr>
            	<th valign="top" width="60px">正文：</th>
                <td>
                	<s:textarea id="logCont" name="worklog.logCont" cols="100" rows="20"></s:textarea>
                </td>
                <td></td>
            </tr>
            <tr>
            	<td></td>
            	<td align="right">
            		<s:submit cssStyle="width:60px" value="提交" />
            		<input type="button" onclick="javascript:showAddForm();" style="width:60px" value="取消" />
            	</td>
                <td></td>
            </tr>
            <tr>
            	<td colspan="3"></td>
            </tr>
        </table>
        
		<script type="text/javascript"> 
		   CKEDITOR.replace('logCont'); 
		</script> 
    </s:form>
</div>
</body>
</html>